package com.secxiot.common.entity;

import com.secxiot.common.constant.ServerStatusEnum;

import java.io.Serializable;

public class ResultListVo<T> extends ResultVo<T> implements Serializable {

    private static final long serialVersionUID = 5346492620557115438L;
    private int totalPage;

    public ResultListVo(T data , int totalPage) {
        super(data);
        this.totalPage = totalPage;
    }

    public ResultListVo(ServerStatusEnum exEnum) {
        super(exEnum);
    }

    public ResultListVo(Exception e) {
        super(e);
    }

    @Override
    public boolean getSuccess() {
        return super.getSuccess();
    }

    @Override
    public int getStatus() {
        return super.getStatus();
    }

    @Override
    public String getMessage() {
        return super.getMessage();
    }

    @Override
    public T getData() {
        return super.getData();
    }

    @Override
    public String toString() {
        return "ResultVo{" +
                "success=" + this.getSuccess() +
                ", status='" + this.getStatus() + '\'' +
                ", message='" + this.getMessage() + '\'' +
                ", totalPage=" + totalPage +
                ", data=" + this.getData() +
                '}';
    }
}
